~ function(){
	class UserCustomEvent{
		constructor() {
		    this.event = {}
		}
		on(eventName,fn){
			this.event[eventName] = this.event[eventName] || []
			this.event[eventName].push(fn)
		}
		off(eventName,fn){
			if(!this.event[eventName] || !this.event[eventName].length) return false 
			this.event[eventName].forEach(function(itemFn,index){
				if(fn===itemFn){
					this.event[eventName].splice(index,1)
				}
			})
		}
		emit(eventName,...params){
			this.event[eventName] && this.event[eventName].forEach(fn=>{
				fn.apply(this,params)
			})
		}
	}
	window.UserCustomEvent = UserCustomEvent
}()